import request from '@/utils/request'

// 获取配置详情 /scrm-api/console/develop/info
export const getDevelopInfo = (params: any) => {
  return request({
    url: '/scrm-api/console/develop/info',
    params
  })
}
// 重置密钥 /scrm-api/console/develop/set-secret
export const setSecret = (data?: any) => {
  return request({
    url: '/scrm-api/console/develop/set-secret',
    method: 'POST',
    data
  })
}
// 获取主账号信息
export const getInfo = () => {
  return request({
    url: '/scrm-api/console/develop/main-account-info',
    method: 'GET'
  })
}
// 获取短信验证码
export const getCode = (data: any) => {
  return request({
    url: '/scrm-api/console/common/send_sms_code',
    method: 'POST',
    data
  })
}
// 白名单确认
export const setWhite = (data: any) => {
  return request({
    url: '/scrm-api/console/develop/set-white-list',
    method: 'POST',
    data
  })
}
// 配置保存
export const save = (data: any) => {
  return request({
    url: '/scrm-api/console/develop/set-config',
    method: 'POST',
    data
  })
}
// 停用
export const stopConfig = (data: any) => {
  return request({
    url: '/scrm-api/console/develop/disable',
    method: 'POST',
    data
  })
}
// 确认开启
export const open = () => {
  return request({
    url: '/scrm-api/console/develop/enable',
    method: 'POST'
  })
}
